package com.mt.restaurant.service.staff;

import com.mt.common.core.web.base.PageDTO;
import com.mt.common.core.web.base.PageResultDTO;
import com.mt.restaurant.entity.staff.SalarySettlement;

import java.util.Date;
import java.util.List;

public interface SalarySettlementService {
    /**
     * 根据分页参数查询工资结算集合
     *
     * @param pageDTO 分页条件
     */
    public PageResultDTO findSalarySettlements(PageDTO pageDTO);

    /**
     * 查询全部工资结算集合
     *
     */
    public List<SalarySettlement> findAllSalarySettlements();

    /**
     * 根据名称查询工资结算集合(只提取ID 和 Name)
     *
     * @param salarySettlementName 名称
     */
    public List<SalarySettlement> findSalarySettlementsWithIdNameByName(String salarySettlementName);

    /**
     * 查询所有工资结算集合(只提取ID 和 Name)
     *
     */
    public List<SalarySettlement> findAllSalarySettlementsWithIdName();

    /**
     * 根据ID查询指定的工资结算(只提取ID 和 Name)
     *
     * @param salarySettlementId Id
     */
    public SalarySettlement findSalarySettlementsWithIdNameById(Long salarySettlementId);

    /**
     * 根据ID查询指定的工资结算
     *
     * @param salarySettlementId Id
     */
    public SalarySettlement findSalarySettlement(Long salarySettlementId);

    /**
     * 根据ID查询指定的工资结算(包含外键)
     *
     * @param salarySettlementId Id
     */
    public SalarySettlement findSalarySettlementWithForeignName(Long salarySettlementId);

    /**
     * 新增工资结算
     *
     * @param salarySettlement 实体对象
     */
    public SalarySettlement saveSalarySettlement(SalarySettlement salarySettlement);

    /**
     * 更新工资结算
     *
     * @param salarySettlement 实体对象
     */
    public SalarySettlement updateSalarySettlement(SalarySettlement salarySettlement);

    /**
     * 根据ID删除工资结算
     *
     * @param salarySettlementId ID
     */
    public void deleteSalarySettlement(Long salarySettlementId);

    int calculateSalary(Long staffId, Date startDate, Date endDate);
}
